program fwrite
	implicit none
	integer :: fileHandle1 = 21, fileHandle2 = 22

	open( unit = fileHandle1, file = "testwrite_data.dat", form = "unformatted", &
		status = "replace", access = "direct", recl = 8 )
	open( unit = fileHandle2, file = "testwrite_num.dat", form = "unformatted", &
		status = "replace", access = "direct", recl = 4 )

	write( fileHandle1, rec = 1 ) dble(1)
	write( fileHandle1, rec = 2 ) 1.2d0
	
	write( fileHandle2, rec = 1 ) 2 

	close(fileHandle1)
	close(fileHandle2)
end program


